package com.education.platform.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.education.platform.entity.SystemConfig;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 系统配置Mapper接口
 *
 * @author education-platform
 * @since 2024-09-27
 */
@Mapper
public interface SystemConfigMapper extends BaseMapper<SystemConfig> {

    /**
     * 根据配置键查询
     */
    SystemConfig selectByConfigKey(@Param("configKey") String configKey);

    /**
     * 查询所有公开配置
     */
    List<SystemConfig> selectPublicConfigs();

    /**
     * 批量更新配置
     */
    void batchUpdate(@Param("configs") List<SystemConfig> configs);

    /**
     * 根据配置类型查询
     */
    List<SystemConfig> selectByConfigType(@Param("configType") String configType);
}

